/*
 * touch-api.h
 *
 *  Created on: 2010/05/27
 *      Author: Administrator
 */

#ifndef TOUCHAPI_H_
#define TOUCHAPI_H_

#ifdef __USE_CMSIS
#include "LPC11xx.h"
#endif

#include "../control.h"

/*Touch panel value */
//#define TOUCH_LEFT_X (7408)
//#define TOUCH_RIGHT_X (6531)
//#define TOUCH_TOP_Y (7249)
//#define TOUCH_BOTTOM_Y (4694)
#define TOUCH_LEFT_X (7125)
#define TOUCH_RIGHT_X (4625)
#define TOUCH_TOP_Y (7258)
#define TOUCH_BOTTOM_Y (4635)


#define SCALE_X (10)
#define SCALE_Y (8)

//#define SCALE_X (MAX_WIDTH / (TOUCH_LEFT_X-TOUCH_RIGHT_X))
//#define SCALE_Y (MAX_HEIGHT / (TOUCH_TOP_Y-TOUCH_BOTTOM_Y))
#define TOUCH_PORT (0)
#define TOUCH_PEN_INTERRUPT_PIN (3)
#define TOUCH_PEN_CS (2)
#define MAX_TOUCH_COUNT (0)

//init touch panel
void init_Touch(void);

/* get TouchGlobalFlag value */
uint8_t get_TouchGlobalFlag();

/*set TouchGlobalFlag value */
void set_TouchGlobalFlag(int8_t value);

/*get Gx value*/
uint16_t get_Gx();

/*get Gy value*/
uint16_t get_Gy();

#endif /* TOUCHAPI_H_ */
